package com.zeroone.star.cpp.service;

import com.zeroone.star.cpp.service.impl.SampleServiceImpl;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @Description 声明式服务异常接口工厂
 * @Author lyx
 * @since 2024/11/5 22:34
 */

@Component
public class CppServiceFallBack implements FallbackFactory<SampleServiceImpl> {
    @Override
    public SampleServiceImpl create(Throwable throwable) {
        return new SampleServiceImpl(throwable);
    }
}
